@inherits BaseFieldSettingViewComponent<Guid?, SingleFileFieldModel>

@namespace FluentCMS.Web.Plugins.Admin.ContentTypeManagement

<FieldSettingForm Model="Model" OnCancel="OnCancel" OnSubmit="OnFormSubmit" TField="SingleFileFieldModel" T="Guid?">
    <Tabs Active="Basic">
        <TabList>
            <TabItem Name="Basic">
                Basic
            </TabItem>
            <TabItem Name="View">
                View
            </TabItem>
        </TabList>
        <TabContent>
            <TabPanel Name="Basic">
                <Grid GutterX="GridGutter.Large">
                    <FormHiddenInput @bind-Value="Model.Type" />
                    <FormInput @bind-Value="Model.Name" Cols="6" Label="Name" Placeholder="Enter Field Name" Required Disabled="@(CurrentState != FieldManagementState.Create)" />
                    <FormInput @bind-Value="Model.Label" Cols="4" Label="Label" Placeholder="Enter Field Label" Required />
                    <FormSwitch @bind-Value="Model.Required" Cols="2" Label="Required" />
                    <FormTextarea @bind-Value="Model.Description" Required Label="Description" Placeholder="Enter Field Description" />
                </Grid>
            </TabPanel>
            <TabPanel Name="View">
                <Grid GutterX="GridGutter.Large">
                    <FormSwitch @bind-Value="Model.DataTableVisible" Cols="3" Label="Show in content list" />
                    <FormNumberInput @bind-Value="Model.DataTableColumnOrder" Cols="3" Label="Column order in list" Placeholder="Enter column order number" Required Disabled="@(!Model.DataTableVisible)" />
                    <FormSelect @bind-Value="Model.DataTableViewComponent" Data="FieldTypes.All[FieldTypes.SINGLE_FILE].DataTableComponents" ValueField="Name" TextField="Title" Cols="6" Label="List view type" Placeholder="choose list view type" Required />
                    <FormNumberInput @bind-Value="Model.FormColWidth" Min="1" Max="12" Cols="3" Label="Column width (1-12)" Placeholder="Enter column width" Required />
                    <FormNumberInput @bind-Value="Model.FormViewOrder" Cols="3" Label="View order in edit" Placeholder="Enter view order in edit mode" Required />
                    <FormSelect @bind-Value="Model.FormViewComponent" Data="FieldTypes.All[FieldTypes.SINGLE_FILE].FormComponents" ValueField="Name" TextField="Title" Cols="6" Label="Form view type" Placeholder="choose form view type" Required />
                </Grid>
            </TabPanel>
        </TabContent>
    </Tabs>
</FieldSettingForm>

